package com.qp.basics.auth.service;

import com.qp.basics.auth.config.bean.SecurityProperties;
import com.qp.basics.common.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.oauth2.common.exceptions.InvalidClientException;
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;
import org.springframework.stereotype.Service;

import javax.sql.DataSource;


@Service
public class MyClientDetailsService extends JdbcClientDetailsService {

    @Autowired
    private RedisUtils redisUtils;

    @Autowired
    private SecurityProperties properties;

    public MyClientDetailsService(DataSource dataSource) {
        super(dataSource);
    }

    @Override
    public ClientDetails loadClientByClientId(String clientId) throws InvalidClientException {
        //todo
        ClientDetails details= super.loadClientByClientId(clientId);
        return details;
    }
}
